<script type="text/javascript">
$(document).ready(function(){
       //Submit form
       $('#signinButton').click(function() {
          $('#signinForm').submit();
        });
       //Sign in focus changes (style and default values
       // default styles
       $('#signin_username').css('color','#aaa');
       $('#signin_passwordtext').show();
       $('#signin_password').hide();
       $('#signin_passwordtext').css('color','#aaa');

       $('#signin_username').attr('value', '<?php echo __('Username');?>');

       $('#signin_username').focus(function(){

            this.valuedefault = this.valuedefault || this.value;

            if (this.value == this.valuedefault)

                this.value = '';

            $(this).css('color','#000');

        });
        $('#signin_username').blur(function(){

            if (this.value.length == 0 || this.value == this.valuedefault)

                $(this).css('color','#aaa');

            if (this.valuedefault && this.value.length==0)

                this.value = this.valuedefault;

        });
        $('#signin_passwordtext').focus(function() {
	    $('#signin_passwordtext').hide();
	    $('#signin_password').show();
	    $('#signin_password').focus();
	});
	$('#signin_password').blur(function() {
	    if($('#signin_password').val() == '') {
	        $('#signin_passwordtext').show();
	        $('#signin_password').hide();
	    }
	});
        //End focus and default efects

     });//end onReady
</script>     


<form method="post" action="<?php echo url_for("@sf_guard_signin") ?>" name="sf_guard_signin" id="signinForm" class="sf_apply_signin_inline">
  
    <div>
        <div class="span-5"><?php echo $formLogin['remember']->render().' '.$formLogin['remember']->renderLabel() ?><?php //echo $formLogin['_csrf_token']->render() ?></div>
        <div class="span-5"><?php echo link_to(__('Reset Your Password',array(),'sfForkedApply'), 'sfApply/resetRequest')  ?></div>
        <div class="span-4 last"><p>&nbsp;</p></div>
        
    </div>
    <div>
        <div class="span-5"><?php echo $formLogin['username']->render() ?></div>
        <div class="span-5"><?php echo $formLogin['password']->render() ?><input type="text" id="signin_passwordtext" value="<?php echo __('Password') ?>"/></div>
        <div class="span-4 last"><a id="signinButton" href="#" class="ovalbutton"><span><?php echo __('Sign in') ?></span></a></div>

    </div>
    <div>
        <div class="span-5"><p>&nbsp;</p></div>
        <div class="span-5"><p>&nbsp;</p></div>
        <div class="span-4 last">
            <?php include_facebook_connect_script() ?>
            <p><fb:login-button></fb:login-button></p>
        </div>

    </div>
    <div>
        <div class="span-5"><?php echo $formLogin['username']->renderError() ?></div>
        <div class="span-5"><?php echo $formLogin['password']->renderError() ?></div>
        <div class="span-4 last"><p>&nbsp;</p></div>

    </div>
    
 
</form>

